package com.zhongkai.model3;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

@Entity
@Table(name = "unit_big_data",  catalog = "")
public class UnitBigData implements Serializable {
    private Long id;
    private Integer bigState;  //开关机
    private String bigSignal;  //信号强度
    private String bigPower;   //当前电压
    private String bigForce;   //实时电量
    private String voltageCurrente; //实时电流
    private String powerAll; //总耗电量
    private Integer userT; //设备设定温度
    private Long bigTime; //数据发生时间
    private String userWaterR; //用户进水温度
    private String userWaterS;//用户出水温度
    private String userStressrR;//用户进水压力
    private String userStressrS;//用户出水压力
    private String groundWaterR;//地源进水温度
    private String groundWaterS;//地源出水温度
    private String groundStressrR;//地源进水压力
    private String groundStressrS;//地源出水压力
    private String unitIn;//压缩机吸气温度
    private String unitOut;//压缩机排气温度
    private String environment;//环境温度
    private String supplyPressure;//补水压力
    private String unitUuid;//CPUID
    private Integer warning;//错误状态
    private String warningCode;//设备错误代码
    private String warningCause;//设备错误代码

    /*    系统处于关机状态时的两种模式：
            0无关机状态
    1运行关机状态
    2模式改变关机状态*/
    private String sysStop;//系统处于关机状态时的两种模式：


    /*    压缩机状态三种模式：
                0   关闭状态
        1   运行状态
        3   待机状态*/
    private String compressor;//系统处于关机状态时的两种模式：

    /*
        地源泵状态三种模式：
                0   关闭状态
        1   运行状态
        3   待机状态*/
    private String groundpump;


    private String sysopenNum;//系统开机次数

    private String compreopenNum;//系统开机次数

    private String locking;//系统锁定状态：0解锁，1锁定

    @Basic
    @Column(name = "sys_stop")
    public String getSysStop() {
        return sysStop;
    }

    public void setSysStop(String sysStop) {
        this.sysStop = sysStop;
    }


    @Basic
    @Column(name = "compressor")
    public String getCompressor() {
        return compressor;
    }

    public void setCompressor(String compressor) {
        this.compressor = compressor;
    }



    @Basic
    @Column(name = "groundpump")
    public String getGroundpump() {
        return groundpump;
    }

    public void setGroundpump(String groundpump) {
        this.groundpump = groundpump;
    }


    @Basic
    @Column(name = "sysopen_num")
    public String getSysopenNum() {
        return sysopenNum;
    }

    public void setSysopenNum(String sysopenNum) {
        this.sysopenNum = sysopenNum;
    }

    @Basic
    @Column(name = "compreopen_num")
    public String getCompreopenNum() {
        return compreopenNum;
    }

    public void setCompreopenNum(String compreopenNum) {
        this.compreopenNum = compreopenNum;
    }


    @Basic
    @Column(name = "locking")
    public String getLocking() {
        return locking;
    }

    public void setLocking(String locking) {
        this.locking = locking;
    }

    @Id
    @GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "big_state")
    public Integer getBigState() {
        return bigState;
    }

    public void setBigState(Integer bigState) {
        this.bigState = bigState;
    }

    @Basic
    @Column(name = "big_signal")
    public String getBigSignal() {
        return bigSignal;
    }

    public void setBigSignal(String bigSignal) {
        this.bigSignal = bigSignal;
    }

    @Basic
    @Column(name = "big_power")
    public String getBigPower() {
        return bigPower;
    }

    public void setBigPower(String bigPower) {
        this.bigPower = bigPower;
    }

    @Basic
    @Column(name = "big_force")
    public String getBigForce() {
        return bigForce;
    }

    public void setBigForce(String bigForce) {
        this.bigForce = bigForce;
    }

    @Basic
    @Column(name = "voltage_currente")
    public String getVoltageCurrente() {
        return voltageCurrente;
    }

    public void setVoltageCurrente(String voltageCurrente) {
        this.voltageCurrente = voltageCurrente;
    }

    @Basic
    @Column(name = "power_all")
    public String getPowerAll() {
        return powerAll;
    }

    public void setPowerAll(String powerAll) {
        this.powerAll = powerAll;
    }

    @Basic
    @Column(name = "user_t")
    public Integer getUserT() {
        return userT;
    }

    public void setUserT(Integer userT) {
        this.userT = userT;
    }

    @Basic
    @Column(name = "big_time")
    public Long getBigTime() {
        return bigTime;
    }

    public void setBigTime(Long bigTime) {
        this.bigTime = bigTime;
    }

    @Basic
    @Column(name = "user_water_r")
    public String getUserWaterR() {
        return userWaterR;
    }

    public void setUserWaterR(String userWaterR) {
        this.userWaterR = userWaterR;
    }

    @Basic
    @Column(name = "user_water_s")
    public String getUserWaterS() {
        return userWaterS;
    }

    public void setUserWaterS(String userWaterS) {
        this.userWaterS = userWaterS;
    }

    @Basic
    @Column(name = "user_stressr_r")
    public String getUserStressrR() {
        return userStressrR;
    }

    public void setUserStressrR(String userStressrR) {
        this.userStressrR = userStressrR;
    }

    @Basic
    @Column(name = "user_stressr_s")
    public String getUserStressrS() {
        return userStressrS;
    }

    public void setUserStressrS(String userStressrS) {
        this.userStressrS = userStressrS;
    }

    @Basic
    @Column(name = "ground_water_r")
    public String getGroundWaterR() {
        return groundWaterR;
    }

    public void setGroundWaterR(String groundWaterR) {
        this.groundWaterR = groundWaterR;
    }

    @Basic
    @Column(name = "ground_water_s")
    public String getGroundWaterS() {
        return groundWaterS;
    }

    public void setGroundWaterS(String groundWaterS) {
        this.groundWaterS = groundWaterS;
    }

    @Basic
    @Column(name = "ground_stressr_r")
    public String getGroundStressrR() {
        return groundStressrR;
    }

    public void setGroundStressrR(String groundStressrR) {
        this.groundStressrR = groundStressrR;
    }

    @Basic
    @Column(name = "ground_stressr_s")
    public String getGroundStressrS() {
        return groundStressrS;
    }

    public void setGroundStressrS(String groundStressrS) {
        this.groundStressrS = groundStressrS;
    }

    @Basic
    @Column(name = "unit_in")
    public String getUnitIn() {
        return unitIn;
    }

    public void setUnitIn(String unitIn) {
        this.unitIn = unitIn;
    }

    @Basic
    @Column(name = "unit_out")
    public String getUnitOut() {
        return unitOut;
    }

    public void setUnitOut(String unitOut) {
        this.unitOut = unitOut;
    }

    @Basic
    @Column(name = "environment")
    public String getEnvironment() {
        return environment;
    }

    public void setEnvironment(String environment) {
        this.environment = environment;
    }

    @Basic
    @Column(name = "supply_pressure")
    public String getSupplyPressure() {
        return supplyPressure;
    }

    public void setSupplyPressure(String supplyPressure) {
        this.supplyPressure = supplyPressure;
    }

    @Basic
    @Column(name = "unit_uuid")
    public String getUnitUuid() {
        return unitUuid;
    }

    public void setUnitUuid(String unitUuid) {
        this.unitUuid = unitUuid;
    }

    @Basic
    @Column(name = "warning")
    public Integer getWarning() {
        return warning;
    }

    public void setWarning(Integer warning) {
        this.warning = warning;
    }

    @Basic
    @Column(name = "warning_code")
    public String getWarningCode() {
        return warningCode;
    }

    public void setWarningCode(String warningCode) {
        this.warningCode = warningCode;
    }

    @Basic
    @Column(name = "warning_cause")
    public String getWarningCause() {
        return warningCause;
    }

    public void setWarningCause(String warningCause) {
        this.warningCause = warningCause;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UnitBigData that = (UnitBigData) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(bigState, that.bigState) &&
                Objects.equals(bigSignal, that.bigSignal) &&
                Objects.equals(bigPower, that.bigPower) &&
                Objects.equals(bigForce, that.bigForce) &&
                Objects.equals(voltageCurrente, that.voltageCurrente) &&
                Objects.equals(powerAll, that.powerAll) &&
                Objects.equals(userT, that.userT) &&
                Objects.equals(bigTime, that.bigTime) &&
                Objects.equals(userWaterR, that.userWaterR) &&
                Objects.equals(userWaterS, that.userWaterS) &&
                Objects.equals(userStressrR, that.userStressrR) &&
                Objects.equals(userStressrS, that.userStressrS) &&
                Objects.equals(groundWaterR, that.groundWaterR) &&
                Objects.equals(groundWaterS, that.groundWaterS) &&
                Objects.equals(groundStressrR, that.groundStressrR) &&
                Objects.equals(groundStressrS, that.groundStressrS) &&
                Objects.equals(unitIn, that.unitIn) &&
                Objects.equals(unitOut, that.unitOut) &&
                Objects.equals(environment, that.environment) &&
                Objects.equals(supplyPressure, that.supplyPressure) &&
                Objects.equals(unitUuid, that.unitUuid) &&
                Objects.equals(warning, that.warning) &&
                Objects.equals(warningCode, that.warningCode) &&
                Objects.equals(warningCause, that.warningCause);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, bigState, bigSignal, bigPower, bigForce, voltageCurrente, powerAll, userT, bigTime, userWaterR, userWaterS, userStressrR, userStressrS, groundWaterR, groundWaterS, groundStressrR, groundStressrS, unitIn, unitOut, environment, supplyPressure, unitUuid, warning, warningCode, warningCause);
    }
}
